<ul class="breadcrumb">
    <li><span class="primary-font"><i class="icon-home"></i></span><a href="index.html"> 主页</a></li>
    <li>计划</li>
</ul>
<div class="smart-widget">
    <div class="smart-widget-header">
        计划
    </div>
    <div class="smart-widget-inner">
        <div class="smart-widget-body">
            <form class="form-horizontal no-margin" id="planAddForm">
                <div class="form-group">
                    <label class="control-label col-lg-3">计划名称</label>
                    <div class="col-lg-4">
                        <input type="text" name="username" class="form-control input-sm"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-lg-3">应用平台</label>
                    <div class="col-lg-4">
                        <select class="form-control input-sm" name="plat">
                            <option>漠河</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-lg-3">动作</label>
                    <div class="col-lg-4">
                        <select class="form-control input-sm" name="action">
                            <option>触发存储过程1</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-lg-3">执行脚本</label>
                    <div class="col-lg-4">
                        <textarea class="form-control" rows="3" name="script"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-lg-3">执行频率</label>
                    <div class="col-lg-4">
                        <div class="radio inline-block">
                            <div class="custom-radio m-right-xs">
                                <input type="radio" id="inlineRadio1" name="inlineRadio">
                                <label for="inlineRadio1"></label>
                            </div>
                            <div class="inline-block vertical-top">一次</div>
                        </div>
                        <div class="radio inline-block">
                            <div class="custom-radio m-right-xs">
                                <input type="radio" id="inlineRadio2" name="inlineRadio">
                                <label for="inlineRadio2"></label>
                            </div>
                            <div class="inline-block vertical-top">每天</div>
                        </div>
                        <div class="radio inline-block">
                            <div class="custom-radio m-right-xs">
                                <input type="radio" id="inlineRadio3" name="inlineRadio">
                                <label for="inlineRadio3"></label>
                            </div>
                            <div class="inline-block vertical-top">每周</div>
                        </div>
                        <div class="radio inline-block">
                            <div class="custom-radio m-right-xs">
                                <input type="radio" id="inlineRadio4" name="inlineRadio">
                                <label for="inlineRadio4"></label>
                            </div>
                            <div class="inline-block vertical-top">每月</div>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-lg-3"></label>
                    <div class="col-lg-4">
                        <button type="submit" id="validateBtn" class="btn btn-success btn-sm">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript" th:inline="javascript">
    $(function () {
        $('#planAddForm').bootstrapValidator({
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                username: {
                    message: '用户名验证失败',
                    validators: {
                        notEmpty: {
                            message: '计划名称不能为空'
                        }
                    }
                },
                plat: {
                    validators: {
                        notEmpty: {
                            message: '应用平台不能为空'
                        }
                    }
                },
                action: {
                    validators: {
                        notEmpty: {
                            message: '动作不能为空'
                        }
                    }
                },
                script: {
                    validators: {
                        notEmpty: {
                            message: '执行脚本不能为空'
                        }
                    }
                }
            }
        });
        $('#validateBtn').click(function() {
            $('form').bootstrapValidator('validate');

        });
    });
</script>